-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it directly usable in Docker #1336
base: develop
Are you sure you want to change the base?
Conversation
@Taeir I'm not directly assigning you as a reviewer (though qpixel-reviewers should cover you), but pinging you in case you have both specific knowledge here and time to review. If not, don't worry about it -- this is why we have a reviewers group. :-) |
I am very interested in this PR. Being able to deploy via Docker would be great! Let me know if I can be of help somehow. |
@ArtOfCode- would you be able to help shepherd this along? I don't know if you're the right reviewer but you have a better sense of this than I do. Thanks. @tsengia thanks for your patience. Note that our Docker setup wasn't intended for production systems and you might run into some issues. Most notably, Redis data isn't stored outside of Docker, and Redis is where we store some state info (like when you last viewed a category) and also some user preferences. Qpixel also can't send email from inside Docker. For more caveats, see https://collab.codidact.org/posts/289900/289902#answer-289902 . You said "semi-production", so maybe none of these are issues for you, but I just wanted to make sure you know. I don't know what it would take to change any of these restrictions; if you have ideas on how to make that better, we'd welcome PRs. But this is where it stands now to the best of my limited knowledge. |
@katomaso I'm sorry for the delay. This PR includes both Docker changes and other changes, but it's not clear (to me at least) how the other changes are related. Can you say more about how the Ruby and db/seeds changes are related to the Docker issue? Or are they unrelated, and we could merge the Docker changes independently of the others? Thanks. |
RUN gem install bundler -v 2.4.22 && \ | ||
bundle install | ||
|
||
COPY . /code | ||
RUN bundle exec rails assets:precompile && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB!
If anyone decides to port this change, please note that we do not have (yet) a separate Dockerfile for development and precompiled assets are not excluded from git tracking via .gitignore
, meaning that without changing the above, doing so will heavily pollute the working directory.
rails db:seed | ||
|
||
# defaults to port 3000 | ||
echo "Starting server 0.0.0.0:3000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB!
If anyone decides to port this change, do note that the port is configurable, so without making it a variable, this will likely report an incorrect port (I have qpixel running on 3014 myself, for example).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question - can you clarify a little as to what was the reasoning behind removing this migration? I presume there was a compelling reason for doing so, but lack context.
ENV NODEJS_HOME=/opt/node-v12.18.3-linux-x64/bin | ||
ENV PATH=$NODEJS_HOME:$PATH | ||
libgdbm-dev \ | ||
nodejs \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB!
If anyone decides to port this change, please, review that the Node.js version pulled is compatible or, better, yet, fix it to a specific version range (as we should do with all other dependencies, tbh).
Hi, I am trying to use your app semi-production in Docker and this is necessary changes to be able to run it painlessly on stock Ubuntu server with generic database.
Are any of those changes interesting for you that you would consider porting them to your code?